package com.ruoyi.project.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.base.Field;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel("阶段字典配置表")
@TableName("project_costing")
public class ProjectCosting extends Field {

    private static final long serialVersionUID = 1L;

    /** 表id */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("id")
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 名称 */
    @Excel(name = "设备")
    private String name;

    /** 项目id */
    private String projectNo;

    /** 设备型号 */
    @Excel(name = "型号")
    private String model;

    /** 设备参数 */
    @Excel(name = "性能/参数")
    private String param;

    /** 品牌 */
    @Excel(name = "品牌")
    private String brand;

    /** 数量 */
    @Excel(name = "数量")
    private BigDecimal count;

    /** 出库数量 */
    @TableField(exist = false)
    private BigDecimal saleCount;


    /** 单位 */
    @Excel(name = "单位")
    private String unit;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal price;

    /** 总价 */
    @Excel(name = "总价")
    private BigDecimal totalPrice;

    /** 总成本 */
    @TableField(exist = false)
    private BigDecimal costTotal;

    /** 销售总金额 */
    @TableField(exist = false)
    private BigDecimal total;

    /** 毛利 */
    @TableField(exist = false)
    private BigDecimal profit;


    /** 折扣率 */
    @Excel(name = "折扣率")
    private String discountRate;

    /** 折后价 */
    @Excel(name = "折后价")
    private BigDecimal discountPrice;

    /** 备注编码 */
    @Excel(name = "备注编码")
    private String remarkCode;


    /** 预数量 */
    @Excel(name = "预数量")
    private Long preCount;

    /** 预单价成本 */
    @Excel(name = "预单价成本")
    private BigDecimal preUnit;

    /** 预成本 */
    @Excel(name = "预成本")
    private BigDecimal prePrice;


    /** 最终数量 */
    @Excel(name = "最终数量")
    private Long finalCount;

    /** 最终成本 */
    @Excel(name = "最终成本")
    private BigDecimal finalCost;

    //操作人
    private String operator;

    //货物id
    private String goodsId;

    //状态
    private String  status;

}
